3.1854 \(\int (a+b x) (c+d x)^n \, dx\)

Optimal. Leaf size=47 \[ \frac{b (c+d x)^{n+2}}{d^2 (n+2)}-\frac{(b c-a d) (c+d x)^{n+1}}{d^2 (n+1)} \]

[Out]

-(((b*c - a*d)*(c + d*x)^(1 + n))/(d^2*(1 + n))) + (b*(c + d*x)^(2 + n))/(d^2*(2
 + n))

_______________________________________________________________________________________

Rubi [A]  time = 0.0493715, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.077 \[ \frac{b (c+d x)^{n+2}}{d^2 (n+2)}-\frac{(b c-a d) (c+d x)^{n+1}}{d^2 (n+1)} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x)*(c + d*x)^n,x]

[Out]

-(((b*c - a*d)*(c + d*x)^(1 + n))/(d^2*(1 + n))) + (b*(c + d*x)^(2 + n))/(d^2*(2
 + n))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 9.48273, size = 37, normalized size = 0.79 \[ \frac{b \left (c + d x\right )^{n + 2}}{d^{2} \left (n + 2\right )} + \frac{\left (c + d x\right )^{n + 1} \left (a d - b c\right )}{d^{2} \left (n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x+a)*(d*x+c)**n,x)

[Out]

b*(c + d*x)**(n + 2)/(d**2*(n + 2)) + (c + d*x)**(n + 1)*(a*d - b*c)/(d**2*(n +
1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0352039, size = 41, normalized size = 0.87 \[ \frac{(c+d x)^{n+1} (a d (n+2)-b c+b d (n+1) x)}{d^2 (n+1) (n+2)} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x)*(c + d*x)^n,x]

[Out]

((c + d*x)^(1 + n)*(-(b*c) + a*d*(2 + n) + b*d*(1 + n)*x))/(d^2*(1 + n)*(2 + n))

_______________________________________________________________________________________

Maple [A]  time = 0.005, size = 46, normalized size = 1. \[{\frac{ \left ( dx+c \right ) ^{1+n} \left ( bdnx+adn+bdx+2\,ad-bc \right ) }{{d}^{2} \left ({n}^{2}+3\,n+2 \right ) }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x+a)*(d*x+c)^n,x)

[Out]

(d*x+c)^(1+n)*(b*d*n*x+a*d*n+b*d*x+2*a*d-b*c)/d^2/(n^2+3*n+2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(d*x + c)^n,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.22024, size = 112, normalized size = 2.38 \[ \frac{{\left (a c d n - b c^{2} + 2 \, a c d +{\left (b d^{2} n + b d^{2}\right )} x^{2} +{\left (2 \, a d^{2} +{\left (b c d + a d^{2}\right )} n\right )} x\right )}{\left (d x + c\right )}^{n}}{d^{2} n^{2} + 3 \, d^{2} n + 2 \, d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(d*x + c)^n,x, algorithm="fricas")

[Out]

(a*c*d*n - b*c^2 + 2*a*c*d + (b*d^2*n + b*d^2)*x^2 + (2*a*d^2 + (b*c*d + a*d^2)*
n)*x)*(d*x + c)^n/(d^2*n^2 + 3*d^2*n + 2*d^2)

_______________________________________________________________________________________

Sympy [A]  time = 1.17724, size = 377, normalized size = 8.02 \[ \begin{cases} c^{n} \left (a x + \frac{b x^{2}}{2}\right ) & \text{for}\: d = 0 \\- \frac{a d}{c d^{2} + d^{3} x} + \frac{b c \log{\left (\frac{c}{d} + x \right )}}{c d^{2} + d^{3} x} + \frac{b c}{c d^{2} + d^{3} x} + \frac{b d x \log{\left (\frac{c}{d} + x \right )}}{c d^{2} + d^{3} x} & \text{for}\: n = -2 \\\frac{a \log{\left (\frac{c}{d} + x \right )}}{d} - \frac{b c \log{\left (\frac{c}{d} + x \right )}}{d^{2}} + \frac{b x}{d} & \text{for}\: n = -1 \\\frac{a c d n \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac{2 a c d \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac{a d^{2} n x \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac{2 a d^{2} x \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} - \frac{b c^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac{b c d n x \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac{b d^{2} n x^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} + \frac{b d^{2} x^{2} \left (c + d x\right )^{n}}{d^{2} n^{2} + 3 d^{2} n + 2 d^{2}} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x+a)*(d*x+c)**n,x)

[Out]

Piecewise((c**n*(a*x + b*x**2/2), Eq(d, 0)), (-a*d/(c*d**2 + d**3*x) + b*c*log(c
/d + x)/(c*d**2 + d**3*x) + b*c/(c*d**2 + d**3*x) + b*d*x*log(c/d + x)/(c*d**2 +
 d**3*x), Eq(n, -2)), (a*log(c/d + x)/d - b*c*log(c/d + x)/d**2 + b*x/d, Eq(n, -
1)), (a*c*d*n*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + 2*a*c*d*(c + d*x)**
n/(d**2*n**2 + 3*d**2*n + 2*d**2) + a*d**2*n*x*(c + d*x)**n/(d**2*n**2 + 3*d**2*
n + 2*d**2) + 2*a*d**2*x*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) - b*c**2*(
c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2) + b*c*d*n*x*(c + d*x)**n/(d**2*n**2
+ 3*d**2*n + 2*d**2) + b*d**2*n*x**2*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2
) + b*d**2*x**2*(c + d*x)**n/(d**2*n**2 + 3*d**2*n + 2*d**2), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.230104, size = 200, normalized size = 4.26 \[ \frac{b d^{2} n x^{2} e^{\left (n{\rm ln}\left (d x + c\right )\right )} + b c d n x e^{\left (n{\rm ln}\left (d x + c\right )\right )} + a d^{2} n x e^{\left (n{\rm ln}\left (d x + c\right )\right )} + b d^{2} x^{2} e^{\left (n{\rm ln}\left (d x + c\right )\right )} + a c d n e^{\left (n{\rm ln}\left (d x + c\right )\right )} + 2 \, a d^{2} x e^{\left (n{\rm ln}\left (d x + c\right )\right )} - b c^{2} e^{\left (n{\rm ln}\left (d x + c\right )\right )} + 2 \, a c d e^{\left (n{\rm ln}\left (d x + c\right )\right )}}{d^{2} n^{2} + 3 \, d^{2} n + 2 \, d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x + a)*(d*x + c)^n,x, algorithm="giac")

[Out]

(b*d^2*n*x^2*e^(n*ln(d*x + c)) + b*c*d*n*x*e^(n*ln(d*x + c)) + a*d^2*n*x*e^(n*ln
(d*x + c)) + b*d^2*x^2*e^(n*ln(d*x + c)) + a*c*d*n*e^(n*ln(d*x + c)) + 2*a*d^2*x
*e^(n*ln(d*x + c)) - b*c^2*e^(n*ln(d*x + c)) + 2*a*c*d*e^(n*ln(d*x + c)))/(d^2*n
^2 + 3*d^2*n + 2*d^2)